package com.link.base.base.sms.service;


import com.link.base.sms.model.SmsSend;
import com.link.base.base.sms.model.SmsAccntLineDTO;
import com.link.base.loyalty.member.model.Member;
import com.link.core.basic.service.BasicService;

/**
 * 短信发送 Service
 *
 * @Author: liulu
 * @Date:15:37 2018/11/5
 */
public interface SmsSendService extends BasicService<SmsSend> {

    /**
     * 增加要发送当条短信的客户
     * @Author: liulu
     * @Date:14:49 2018/11/5
     * @param  entity
     * @throws Exception
     */
    public void addSendAccont(SmsSend entity) throws Exception;

    /**
     * 根据短信ID删除客户短信中间表
     *
     * @param smsId
     */
    public void delBySmsId(Long smsId);

    /**
     * 查询要发送的客户
     * @Author: liulu
     * @Date:14:51 2018/11/5
     */
    public void isSendSms();

    /**
     * 根据短信id查绚客户
     * @Author: liulu
     * @Date:14:51 2018/11/5
     * @param  smsId
     * @return: int
     */
    public int querCountByAccn(Long smsId);

    /**
     * 新建短信
     * @Author: liulu
     * @Date:14:52 2018/11/5
     * @param  entity
     * @return:   返回短信id
     */
    public Long insertSms(SmsSend entity) throws Exception;

    /**
     * 把短信id与客户id关联
     * @Author: liulu
     * @Date:14:52 2018/11/5
     * @param  sendSmsId
     * @param  accoutId
     */
    public void addSendAccontLine(Long sendSmsId, Long accoutId);

    /**
     * 把短信id与客户id关联
     * @Author: liulu
     * @Date:14:52 2018/11/5
     * @param  sendSmsId
     * @param  accoutId
     * @param  corpid
     */
    public void addSendAccontLineNew(Long sendSmsId, Long accoutId, Long corpid);

    /**
     * 发送短信
     * @Author:LiuLu
     * @Date:17:31 2018/5/22
     * @param smsSend 短信
     */
    public void sendSms(SmsSend smsSend);

    /**
     * 发送短信
     * @Author: 顾桂山
     * @Date:17:31 2018/5/22
     * @param smsSend 短信
     * @param member 会员信息
     */
    public void sendSms(SmsSend smsSend, Member member);

    /**
     * 分页查询客户数据，根据手机号去重客户后，插入短信-客户中间表，返回去重后记录数
     *
     * @author 曲元涛
     * @date 2019/4/26 9:44
     * @param smsAccntLineDTO SmsAccntLineDTO
     * @param sendSmsId 短信记录Id
     * @param rows 分页条数
     */
    int addSendAcctRemoveDup(SmsAccntLineDTO smsAccntLineDTO, Long sendSmsId, int rows) throws Exception;

}
